using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Pheonix.CodeLibrary.Web;

public partial class master_AdminLayout : BaseMaster
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadImages();
        LoadData();
    }

    private void LoadData()
    {
        if (SessionManager.IsAdminUserLoggedIn)
            lblUserName.Text = SessionManager.LoggedAdminUser.UserName;
        else
            Response.Redirect("~/public/adminlogon.aspx");
    }

    private void LoadImages()
    {
        imbLogout.ImageUrl = "~/App_Themes/" + Page.StyleSheetTheme + "/image/admin-logout.gif";
        imbAdminLogo.ImageUrl = "~/App_Themes/" + Page.StyleSheetTheme + "/image/admin-logo.png";
    }

    protected void Logout_Click(object sender, EventArgs e)
    {
        SessionManager.LoggedAdminUser = null;
        Response.Redirect("~/public/adminlogon.aspx");
    }
}
